package com.newtouch.cq.base.starter.business.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.newtouch.cq.base.starter.business.entity.SysOrganization;
import com.newtouch.cq.base.starter.business.model.dto.SysOrganizationAddDTO;
import com.newtouch.cq.base.starter.business.model.dto.SysOrganizationUpdDTO;
import com.newtouch.cq.base.starter.business.model.vo.OrgTreeModel;
import com.newtouch.cq.lang.result.MccObjectResult;

import java.util.List;

/**
 * <p>
 * 系统组织表 服务类
 * </p>
 *
 * @author Alex
 * @since 2021-08-02
 */
public interface IBaseSysOrganizationService extends IService<SysOrganization> {


    /**
     *获取组织树
     * @return
     */
    MccObjectResult<List<OrgTreeModel>> selectListTree();

    /**
     * 查询用户拥有的组织集合
     * @return
     */
   List<SysOrganization> selectAuthList(long userId,long orgId);


    /**
     * 通过标识删除组织
     * @param id
     */
    void deleteById(long id);

    /**
     * 组织新增
     * @param dto
     */
    void add(SysOrganizationAddDTO dto);

    /**
     * 组织更新
     */
    void upadte(long id,SysOrganizationUpdDTO dto);
}
